import os
from dotenv import load_dotenv

from tcm_sense_chat.common_utils.paths_util import get_project_root


class env_util:
    def __init__(self):
        self.env_path = get_project_root.joinpath(".env")
        load_dotenv(dotenv_path=self.env_path)

    def _get_env(self, key: str) -> str:
        return os.getenv(key)

get_env = env_util()._get_env


if __name__ == '__main__':
    print(get_env("TONGYI_API_KEY"))
